from django.db import models


class Student(models.Model):
    s_name = models.CharField(max_length=16, unique=True)
    s_password = models.CharField(max_length=128)
    s_token = models.CharField(max_length=256)


class Customer(models.Model):
    c_name = models.CharField(max_length=32)


class Goods(models.Model):
    g_name = models.CharField(max_length=32)
    g_customer = models.ManyToManyField(Customer)


# 用户注册，上传头像
class UserModel(models.Model):
    u_name = models.CharField(max_length=32)
    u_icon = models.ImageField(upload_to='icon')
